﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>角色管理</title>
    <link rel="stylesheet" href="../../assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="../../assets/module/admin.css?v=314"/>

    <link rel="stylesheet" href="../../assets/libs/ztree/css/zTreeStyle/zTreeStyle.css">

    <link rel="stylesheet" href="../../assets/css/publicStyle.css">

    <!--[if lt IE 9]>
    <script src="../../assets/libs/html5shiv.min.js"></script>
    <script src="../../assets/libs/respond.min.js"></script>
    <![endif]-->
    <style>
        .layui-fluid .layui-card{
            height:calc(100vh - 30px);
            overflow: auto;
        }
        #page-box{
            display: inline;
            float: right;
        }
        #page-box .layui-laypage{
            margin: 0;
        }
        .ztree *{
            font-weight: 400;
            font-size: 14px!important;
        }
        .ztree li a{
            height: 22px!important;
        }
        .ztree li span{
            color: #555;
        }
        .btn-box{
            position: absolute;
            bottom: 20px;
            right: 20px;
        }
        #roleMenuTree,#permissionTree{
            height: 350px;
            overflow: auto;
        }
    </style>

</head>
<body>

<!-- 页面加载loading -->
<div class="page-loading">
    <div class="ball-loader">
        <span></span><span></span><span></span><span></span>
    </div>
</div>

<!-- 正文开始 -->
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-form toolbar">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <div class="layui-input-inline mr0">
                            <input name="roleName" class="layui-input" type="text" placeholder="输入角色名称"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline mr0">
                            <input name="roleCode" class="layui-input" type="text" placeholder="输入角色代码"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn icon-btn layui-btn-sm" lay-filter="formSubSearchUser" lay-submit>
                            <i class="layui-icon">&#xe615;</i>搜索
                        </button>
                        <button id="btnAddRole" class="layui-btn icon-btn layui-btn-sm"><i class="layui-icon">&#xe654;</i>添加</button>
                        <button id="btnRefreshRole" class="layui-btn icon-btn layui-btn-sm"><i class="layui-icon">&#xe669;</i>刷新</button>
                    </div>
                    <div id="page-box"></div>
                </div>
            </div>

            <table class="layui-table" id="tableRole" lay-filter="tableRole"></table>
        </div>
    </div>
</div>

<!-- 表格操作列 -->
<script type="text/html" id="tableBarRole">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<!-- 表单弹窗 -->
<script type="text/html" id="addRoleModel">
    <div class="addRoleBox">
        <form id="addRoleForm" lay-filter="addRoleForm" class="layui-form model-form">
            <input name="roleId" type="hidden"/>
            <div class="layui-form-item">
                <label class="layui-form-label">角色名称</label>
                <div class="layui-input-block">
                    <input name="roleName" placeholder="请输入角色名称" type="text" class="layui-input" maxlength="20"
                           lay-verType="tips" lay-verify="required" />
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">角色代码</label>
                <div class="layui-input-block">
                    <input name="roleCode" placeholder="请输入角色代码" type="text" class="layui-input" maxlength="20"
                           lay-verType="tips" lay-verify="required" />
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                        <ul class="layui-tab-title">
                            <li class="layui-this">权限集合</li>
<!--                            <li>权限集合</li>-->
                        </ul>
                        <div class="layui-tab-content" style="height: 100px;">
                            <div class="layui-tab-item layui-show">
                                <div id="roleMenuTree" class="ztree"></div>

                            </div>
                            <div class="layui-tab-item">
                                <div id="permissionTree" class="ztree"></div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="layui-form-item text-right btn-box">
                <button class="layui-btn layui-btn-primary" type="button" ew-event="closePageDialog">取消</button>
                <button class="layui-btn" lay-filter="addRoleSubmit" lay-submit>保存</button>
            </div>
        </form>

    </div>
</script>

<!-- js部分 -->
<script src="../../assets/libs/jquery/jquery-3.2.1.min.js"></script>

<script type="text/javascript" src="../../assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="../../assets/js/common.js?v=314"></script>

<script src="../../assets/libs/ztree/js/jquery.ztree.core.min.js"></script>
<script src="../../assets/libs/ztree/js/jquery.ztree.excheck.min.js"></script>

<script src="../../assets/libs/template-web.js"></script>
<script src="../../assets/libs/axios.min.js"></script>
<script src="../../assets/js/config.js"></script>
<script src="../../assets/js/authority.js"></script>

<script src="../../assets/js/system/role.js"></script>

</body>
</html>
